@use '_variables' as *;

.header-container {
  width: 100%;
  height: $header-height;
  transition: all $duration ease;

  .header-section {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: $app-max-width;
    height: $header-height;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    z-index: $z-index-header;

    @include responsive(lt-sm) {
      padding: 0 1rem;

      .pc-menu {
        display: none;
      }

      .mobile-menu {
        display: block;
      }
    }

    @include responsive(lt-md) {
      padding: 0 1rem;

      .pc-menu {
        display: none;
      }

      .mobile-menu {
        display: block;
      }
    }

    @include responsive(lt-lg) {
      .pc-menu {
        display: block;
      }

      .mobile-menu {
        display: none;
      }
    }

    @include responsive(gt-lg) {
      .pc-menu {
        display: block;
      }

      .mobile-menu {
        display: none;
      }
    }

    .pc-menu {
      width: 100%;
    }

    .mobile-menu {
      width: 100%;

      .line-one {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
      }
    }
  }
}

// Layout
.main-container {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  max-width: $max-width;
  width: 100%;

  @include responsive(lt-sm) {
    gap: 1rem;
    flex-direction: column;
  }

  @include responsive(lt-md) {
    gap: 2rem;
    flex-direction: column;
  }

  @include responsive(lt-lg) {
    padding: 2rem;
    gap: 2rem;
  }

  @include responsive(gt-lg) {
    padding: 2rem 3rem;
    gap: 5rem;
  }

  .page-main {
    flex: 1;
    min-width: 0;
    min-height: calc(100vh - 4rem);
  }
}

.blank-container {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.logo {
  width: 30px;
  height: 30px;
  overflow: hidden;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  a {
    display: flex;
    align-items: center;
    color: var(--text-color);

    @include hover-effect {
      color: var(--primary-color);
    }

    span {
      margin-right: 0.3rem;
    }
  }

  .active {
    color: var(--primary-color);
  }
}

// Sidebar styles
.sidebar {
  position: fixed;
  height: calc(100vh - 5rem);
  overflow: auto;

  .blog-card {
    padding: 1rem 0.3rem;
    border-bottom: 1px solid var(--border-color);

    @include responsive(lt-md) {
      padding: 1rem;
    }

    &:last-child {
      margin-bottom: 0;
    }

    h3 {
      font-size: 1.25rem;
      margin-bottom: 1rem;
    }
  }

  .profile {
    text-align: left;

    .avatar {
      display: inline-block;
      width: 3rem;
      height: 3rem;
      border-radius: 1.5rem;
      overflow: hidden;
      background-color: var(--border-color);

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }
  }

  .social-links {
    display: flex;
    align-items: center;
    gap: 1rem;

    a {
      display: flex;
      align-items: center;
      color: var(--text-light-color);
      @include hover-effect {
        color: var(--primary-color);
      }
    }
  }

  .friends {
    ul {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      max-height: 8rem;
      overflow: auto;

      li {
        &:last-child {
          margin-bottom: 0;
        }

        a {
          text-decoration: underline;
          color: var(--text-light-color);
          @include hover-effect {
            color: var(--primary-color);
          }
        }
      }
    }
  }
}

.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  &::-webkit-scrollbar {
    /* Chrome */
    display: none;
  }
}
